#!/usr/bin/bash python
# coding=utf-8

from DBOperation import *

if __name__ == '__main__':
    sql_path = '//'
    sql_file = '../ddl.sql'

    with open(sql_path + sql_file, 'r', encoding='utf8') as sql:
        sql_txt = sql.readlines()
    print(sql_txt)
    db = DBBase(database='test_db', user='admin', password='123456', port=5432, host='localhost')
    db.execute(''.join(sql_txt))
    db.close()
